package src.com.zt.demo.interface_extends_demo.object_interface;

public abstract class Teacher { //抽象类
    public abstract void Teaching();    //抽象方法
}

class MathTeacher  extends  Teacher{    //两个子类必须实现抽象方法

    @Override
    public void Teaching() {    //重写抽象方法
        System.out.println("数学");
    }
}

class EnglishTeacher  extends  Teacher{

    @Override
    public void Teaching() {
        System.out.println("english");

    }
}
